package com.ysx.service.impl;

import com.itheima.health.pojo.User;
import com.ysx.dao.UserDao;
import com.ysx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImpl implements UserService {
//    注入userdao对象
    @Autowired
    private UserDao userDao;

    /**
     *  通过name获取User对象
     * @param name
     * @return
     */
    @Override
    public User getUserByName(String name) {
        return userDao.getUserByName(name);
    }
}
